package com.bw.mapper;

import com.bw.bean.Payment;
import com.bw.bean.Vo1;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author asus
* @description 针对表【payment】的数据库操作Mapper
* @createDate 2024-12-02 08:56:13
* @Entity com.bw.bean.Payment
*/
@Mapper
public interface PaymentMapper {

    List<Vo1> getlist();

    @Select("select o.shop name,sum(p.amount) vleo from payment p\n" +
            "   left join orderinfo o on p.orderinfoid = o.id\n" +
            "group by o.shop")
    List<Vo1> getlist1();

    @Select("select b.name name,sum(amount) vleo from payment p\n" +
            "    left join baseprovince b on p.baseprovinceid=b.id\n" +
            "group by b.name")
    List<Vo1> getlist2();

    @Select("select sum(amount) from payment where status='支付成功'")
    int getlist4();
}




